package com.model;

public class Cal {
		private double a;
		private double b;
		private String type;
		public double getA() {
			return a;
		}
		public void setA(double a) {
			this.a = a;
		}
		public double getB() {
			return b;
		}
		public void setB(double b) {
			this.b = b;
		}
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		
		public double result () {
			if(type.equals("+")) {
				return a+b;
			}else if(type.equals("-")) {
				return a-b;
			}else if(type.equals("*")) {
				return a*b;
			}else {
				return a/b;
			}
		}
}
